public class HasQuarterState implements State
{
	GumballMachine machine;

	public HasQuarterState(GumballMachine in)
	{
		machine = in;
	}

	public void insertQuarter()
	{
		System.out.println("Already Have Quarter.");
	}

	public void ejectQuarter()
	{
		System.out.println("Quarter Ejecting.");
		//change state to noquarterstate
		machine.setState(machine.getNoQuarterState());
	}

	public void turnCrank()
	{
		System.out.println("Turning Crank.");
		machine.setState(machine.getSoldState());
	}

	public void dispense()
	{
		System.out.println("You can't get GumBall.");
	}
}
